home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TTTTeeeesssstttt::::::::HHHHaaaarrrrnnnneeeessssssss((((3333)))) 4444////AAAAuuuugggg////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) TTTTeeeesssstttt::::::::HHHHaaaarrrrnnnneeeessssssss((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- Test::Harness - run perl standard test scripts with
- statistics
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- use Test::Harness;
-
- _r_u_n_t_e_s_t_s(@tests);
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- (By using the the _T_e_s_t manpage module, you can write test
- scripts without knowing the exact output this module
- expects. However, if you need to know the specifics, read
- on!)
-
- Perl test scripts print to standard output "ok N" for each
- single test, where N is an increasing sequence of integers.
- The first line output by a standard test script is "1..M"
- with M being the number of tests that should be run within
- the test script. _T_e_s_t::_H_a_r_n_e_s_s::_r_u_n_t_e_s_t_s(@tests) runs all
- the testscripts named as arguments and checks standard
- output for the expected "ok N" strings.
-
- After all tests have been performed, _r_u_n_t_e_s_t_s() prints some
- performance statistics that are computed by the Benchmark
- module.
-
- TTTThhhheeee tttteeeesssstttt ssssccccrrrriiiipppptttt oooouuuuttttppppuuuutttt
-
- Any output from the testscript to standard error is ignored
- and bypassed, thus will be seen by the user. Lines written
- to standard output containing /^(not\s+)?ok\b/ are
- interpreted as feedback for _r_u_n_t_e_s_t_s(). All other lines are
- discarded.
-
- It is tolerated if the test numbers after ok are omitted. In
- this case Test::Harness maintains temporarily its own
- counter until the script supplies test numbers again. So the
- following test script
-
- print <<END;
- 1..6
- not ok
- ok
- not ok
- ok
- ok
- END
-
- will generate
-
-
-
-
-
- Page 1 (printed 10/23/98)
-
-
-
-
-
-
- TTTTeeeesssstttt::::::::HHHHaaaarrrrnnnneeeessssssss((((3333)))) 4444////AAAAuuuugggg////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) TTTTeeeesssstttt::::::::HHHHaaaarrrrnnnneeeessssssss((((3333))))
-
-
-
- FAILED tests 1, 3, 6
- Failed 3/6 tests, 50.00% okay
-
- The global variable $Test::Harness::verbose is exportable
- and can be used to let _r_u_n_t_e_s_t_s() display the standard
- output of the script without altering the behavior
- otherwise.
-
- The global variable $Test::Harness::switches is exportable
- and can be used to set perl command line options used for
- running the test _s_c_r_i_p_t(s). The default value is -w.
-
- If the standard output line contains substring # Skip (with
- variations in spacing and case) after ok or ok NUMBER, it is
- counted as a skipped test. If the whole testscript
- succeeds, the count of skipped tests is included in the
- generated output.
-
- EEEEXXXXPPPPOOOORRRRTTTT
- &runtests is exported by Test::Harness per default.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- All tests successful.\nFiles=%d, Tests=%d, %s
- If all tests are successful some statistics about the
- performance are printed.
-
- FAILED tests %s\n\tFailed %d/%d tests, %.2f%% okay.
- For any single script that has failing subtests
- statistics like the above are printed.
-
- Test returned status %d (wstat %d)
- Scripts that return a non-zero exit status, both $? >> 8
- and $? are printed in a message similar to the above.
-
- Failed 1 test, %.2f%% okay. %s
-
- Failed %d/%d tests, %.2f%% okay. %s
- If not all tests were successful, the script dies with
- one of the above messages.
-
- EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
- Setting HARNESS_IGNORE_EXITCODE makes harness ignore the
- exit status of child processes.
-
- If HARNESS_FILELEAK_IN_DIR is set to the name of a
- directory, harness will check after each test whether new
- files appeared in that directory, and report them as
-
- LEAKED FILES: scr.tmp 0 my.db
-
- If relative, directory name is with respect to the current
- directory at the moment _r_u_n_t_e_s_t_s() was called. Putting
-
-
-
- Page 2 (printed 10/23/98)
-
-
-
-
-
-
- TTTTeeeesssstttt::::::::HHHHaaaarrrrnnnneeeessssssss((((3333)))) 4444////AAAAuuuugggg////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) TTTTeeeesssstttt::::::::HHHHaaaarrrrnnnneeeessssssss((((3333))))
-
-
-
- absolute path into HARNESS_FILELEAK_IN_DIR may give more
- predicatable results.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- the _T_e_s_t manpage for writing test scripts and also the
- _B_e_n_c_h_m_a_r_k manpage for the underlying timing routines.
-
- AAAAUUUUTTTTHHHHOOOORRRRSSSS
- Either Tim Bunce or Andreas Koenig, we don't know. What we
- know for sure is, that it was inspired by Larry Wall's TEST
- script that came with perl distributions for ages. Numerous
- anonymous contributors exist. Current maintainer is Andreas
- Koenig.
-
- BBBBUUUUGGGGSSSS
- Test::Harness uses $^X to determine the perl binary to run
- the tests with. Test scripts running via the shebang (#!)
- line may not be portable because $^X is not consistent for
- shebang scripts across platforms. This is no problem when
- Test::Harness is run with an absolute path to the perl
- binary or when $^X can be found in the path.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 (printed 10/23/98)
-
-
-
-